#include <iostream>
#include <algorithm>

using namespace std;

string add(string a, string b)
{
    string ret, temp;
    int t, i;
    if (b.size() > a.size())
    {
        temp = a;
        a = b;
        b = temp;
    }
    
    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());

    t = 0;
    for (i = 0; i < a.size(); i++)
    {
        t += a[i] - '0';
        if (i < b.size())
        {
            t += b[i] - '0';
        }
        ret.push_back(t % 10 + '0');
        t /= 10;        
    }

    if (t > 0)
    {
        ret.push_back(t + '0');
    }
    reverse(ret.begin(), ret.end());
    return ret;
}

int main(int argc, char const *argv[])
{
    string a, b;
    cin >> a >> b;
    cout << add(a, b);
    return 0;
}
